/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projetointegrado;

/**
 *
 * @author Thor
 */
public class InterfaceBatalha{
    Player player;
    Enemy inimigo;
    String blocoOrigem, labelVidaPlayer, labelVidaInimigo, labelAtckProgPlayer, labelAtckProgInimigo;
    boolean atckProg = false, atckAdm = false, atckMat = false, atckHum = false;
    int baseDamage;
    JanelaJogo jj;
    
    

    
    
    public void InterfaceBatalha(Player player, Enemy inimigo){
        this.player = player;
        this.inimigo = inimigo;
    }


    

    

    public Player danoAoPlayer(Player player, Enemy inimigo){

        inimigo.setModificadorDificuldade(0);
        inimigo.setBaseAttack(inimigo.getBaseAttack()*inimigo.getModDificuldade());

        
        if(ataqueProg()){
        player.setHpAtual(player.getHpAtual() - (inimigo.getBaseAttack() + inimigo.getSkillProg() ));
        atckProg = false;
        }else if(ataqueAdm()){
        player.setHpAtual(player.getHpAtual() - (inimigo.getBaseAttack() + inimigo.getSkillAdm() ));    
        atckAdm = false;
        }else if(ataqueMat()){
        player.setHpAtual(player.getHpAtual() - (inimigo.getBaseAttack() + inimigo.getSkillMat()));    
        atckMat = false;
        }else if(ataqueHum()){
        player.setHpAtual(player.getHpAtual() - (inimigo.getBaseAttack() + inimigo.getSkillHum()));    
        atckHum = false;
        }        
        
        return player;
    }
        public Enemy danoAoInimigoAdm(Player player, Enemy inimigo){
        inimigo.setHp( inimigo.getHp() - (player.getBaseAttack()+(player.getSkillAdm())));   
        return inimigo;
    }
        public Enemy danoAoInimigoMat(Player player, Enemy inimigo){
        inimigo.setHp( inimigo.getHp() - (player.getBaseAttack()+(player.getSkillMat())));   
        return inimigo;
    }
        public Enemy danoAoInimigoHum(Player player, Enemy inimigo){
        inimigo.setHp( inimigo.getHp() - (player.getBaseAttack()+(player.getSkillHum())));   
        return inimigo;
    }
        public Enemy danoAoInimigoProg(Player player, Enemy inimigo){
        inimigo.setHp( inimigo.getHp() - (player.getBaseAttack()+(player.getSkillProg())));   
        return inimigo;
    }
        
        

    public boolean ataqueProg(){
        atckProg = true;
        return atckProg;
    }
    public boolean ataqueAdm(){
        atckAdm = true;
        return atckAdm;
    }
    public boolean ataqueMat(){
        atckMat = true;
        return atckMat;
    }
    public boolean ataqueHum(){
        atckHum = true;
        return atckHum;
    }
}
